package com.askinhand.action;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;

import org.apache.struts2.json.annotations.JSON;

import com.askinhand.bean.AudioQues;
import com.opensymphony.xwork2.ActionSupport;


public class AudioQuesSubmitAction extends ActionSupport{


	//QuestionService audioservice;
	String content;
	String status;
	String time;
	String title;
	String type;
	String url;
	String uid;
	String strResult;
	
	
	
/*	@JSON (serialize=false)

	public QuestionService getAudioservice() {
		return audioservice;
	}
	public void setAudioservice(QuestionService audioservice) {
		this.audioservice = audioservice;
	}*/
	public String getStrResult() {
		return strResult;
	}
	public void setStrResult(String strResult) {
		this.strResult = strResult;
	}
	@JSON (serialize=false)
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	@JSON (serialize=false)

	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	@JSON (serialize=false)

	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	@JSON (serialize=false)

	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	@JSON (serialize=false)

	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@JSON (serialize=false)

	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;

	}
	@JSON (serialize=false)

	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	
	
	public String execute(){
		
		AudioQues audioques=new AudioQues();
		
		audioques.setContent(content);
		try {
			audioques.setTime(DateFormat.getInstance().parse(time));
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		audioques.setStatus(status);
		audioques.setTitle(title);
		audioques.setType(type);
		audioques.setUrl(url);
		audioques.setUid(Integer.parseInt(uid));
		
	//	strResult=audioservice.audioQuesSubmit(audioques);
		
		
		
		
		
		
		return strResult;
		
	}
	
	

}
